nl80211: fix code calculating average signal and rate
authorRafał Miłecki <[email protected]>
Wed, 28 Mar 2018 08:30:07 +0000 (10:30 +0200)
committerRafał Miłecki <[email protected]>
Mon, 9 Apr 2018 05:30:37 +0000 (07:30 +0200)
commit77c32f0eb637524f7f300d8cf24d455ccec5c2bb
treeeae01f11c55d5a2e3dc235a1cf5e481a4347ff70
parent223e09bf3f180797aeea0f6dc1721e5a55215e66
nl80211: fix code calculating average signal and rate

Using average of previous average and the next value is highly
imprecise. E.g. for values 20, 20, 20, 180 it would result in /average/
of 100 (instead of 60). Fix it by storing & using an info of how many
samples were used for the previous calculation.

Signed-off-by: Rafał Miłecki <[email protected]>
iwinfo_nl80211.c
iwinfo_nl80211.h